<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>EconDatasets.jl</title>
<meta  http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta  name="generator" content="Org-mode" />
<style type="text/css">
 <!--/*--><![CDATA[/*><!--*/
  .title  { text-align: center; }
  .todo   { font-family: monospace; color: red; }
  .done   { color: green; }
  .tag    { background-color: #eee; font-family: monospace;
            padding: 2px; font-size: 80%; font-weight: normal; }
  .timestamp { color: #bebebe; }
  .timestamp-kwd { color: #5f9ea0; }
  .right  { margin-left: auto; margin-right: 0px;  text-align: right; }
  .left   { margin-left: 0px;  margin-right: auto; text-align: left; }
  .center { margin-left: auto; margin-right: auto; text-align: center; }
  .underline { text-decoration: underline; }
  #postamble p, #preamble p { font-size: 90%; margin: .2em; }
  p.verse { margin-left: 3%; }
  pre {
    border: 1px solid #ccc;
    box-shadow: 3px 3px 3px #eee;
    padding: 8pt;
    font-family: monospace;
    overflow: auto;
    margin: 1.2em;
  }
  pre.src {
    position: relative;
    overflow: visible;
    padding-top: 1.2em;
  }
  pre.src:before {
    display: none;
    position: absolute;
    background-color: white;
    top: -10px;
    right: 10px;
    padding: 3px;
    border: 1px solid black;
  }
  pre.src:hover:before { display: inline;}
  pre.src-sh:before    { content: 'sh'; }
  pre.src-bash:before  { content: 'sh'; }
  pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
  pre.src-R:before     { content: 'R'; }
  pre.src-perl:before  { content: 'Perl'; }
  pre.src-java:before  { content: 'Java'; }
  pre.src-sql:before   { content: 'SQL'; }

  table { border-collapse:collapse; }
  caption.t-above { caption-side: top; }
  caption.t-bottom { caption-side: bottom; }
  td, th { vertical-align:top;  }
  th.right  { text-align: center;  }
  th.left   { text-align: center;   }
  th.center { text-align: center; }
  td.right  { text-align: right;  }
  td.left   { text-align: left;   }
  td.center { text-align: center; }
  dt { font-weight: bold; }
  .footpara:nth-child(2) { display: inline; }
  .footpara { display: block; }
  .footdef  { margin-bottom: 1em; }
  .figure { padding: 1em; }
  .figure p { text-align: center; }
  .inlinetask {
    padding: 10px;
    border: 2px solid gray;
    margin: 10px;
    background: #ffffcc;
  }
  #org-div-home-and-up
   { text-align: right; font-size: 70%; white-space: nowrap; }
  textarea { overflow-x: auto; }
  .linenr { font-size: smaller }
  .code-highlighted { background-color: #ffff00; }
  .org-info-js_info-navigation { border-style: none; }
  #org-info-js_console-label
    { font-size: 10px; font-weight: bold; white-space: nowrap; }
  .org-info-js_search-highlight
    { background-color: #ffff00; color: #000000; font-weight: bold; }
  /*]]>*/-->
</style>
<link rel="shortcut icon" href="./favicon.ico" type="image/x-icon" />
<meta charset='utf-8'>
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link href='https://fonts.googleapis.com/css?family=Architects+Daughter' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="stylesheets/stylesheet.css" media="screen" />
<link rel="stylesheet" type="text/css" href="stylesheets/pygment_trac.css" media="screen" />
<link rel="stylesheet" type="text/css" href="stylesheets/print.css" media="print" />
<header>
<div class="inner">
<h1>EconDatasets.jl</h1>
<h2>EconDatasets package for Julia language</h2>
<a href="https://github.com/JuliaFinMetriX/EconDatasets.jl" class="button"><small>View project on</small>GitHub</a>
</div>
</header>
<div id="content-wrapper">
<div class="inner clearfix">
<aside id="sidebar">
<a href="https://github.com/JuliaFinMetriX">
<img src="./logo.png" width="200" height="114">
</a>
<a href="https://github.com/JuliaFinMetriX/EconDatasets.jl/zipball/master" class="button">
<small>Download</small>
.zip file
</a>
<a href="https://github.com/JuliaFinMetriX/EconDatasets.jl/tarball/master" class="button">
<small>Download</small>
.tar.gz file
</a>
<p class="repo-owner"><a href="https://github.com/JuliaFinMetriX/EconDatasets.jl"></a> maintained by <a href="https://github.com/cgroll">cgroll</a>.</p>
</aside>
<section id="main-content">
<div>
<script type="text/javascript">
/*
@licstart  The following is the entire license notice for the
JavaScript code in this tag.

Copyright (C) 2012-2013 Free Software Foundation, Inc.

The JavaScript code in this tag is free software: you can
redistribute it and/or modify it under the terms of the GNU
General Public License (GNU GPL) as published by the Free Software
Foundation, either version 3 of the License, or (at your option)
any later version.  The code is distributed WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE.  See the GNU GPL for more details.

As additional permission under GNU GPL version 3 section 7, you
may distribute non-source (e.g., minimized or compacted) forms of
that code without the copy of the GNU GPL normally required by
section 4, provided you include this license notice and a URL
through which recipients can access the Corresponding Source.


@licend  The above is the entire license notice
for the JavaScript code in this tag.
*/
<!--/*--><![CDATA[/*><!--*/
 function CodeHighlightOn(elem, id)
 {
   var target = document.getElementById(id);
   if(null != target) {
     elem.cacheClassElem = elem.className;
     elem.cacheClassTarget = target.className;
     target.className = "code-highlighted";
     elem.className   = "code-highlighted";
   }
 }
 function CodeHighlightOff(elem, id)
 {
   var target = document.getElementById(id);
   if(elem.cacheClassElem)
     elem.className = elem.cacheClassElem;
   if(elem.cacheClassTarget)
     target.className = elem.cacheClassTarget;
 }
/*]]>*///-->
</script>
</head>
<body>
<div id="content">
<h1 class="title">EconDatasets.jl</h1>
<div id="table-of-contents">
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#sec-1">1. Motivation</a></li>
<li><a href="#sec-2">2. Table of data sets</a></li>
<li><a href="#sec-3">3. Data sets to be downloaded first</a></li>
<li><a href="#sec-4">4. Table of functions to interactively download data</a></li>
<li><a href="#sec-5">5. Acknowledgement</a></li>
</ul>
</div>
</div>

<div id="outline-container-sec-1" class="outline-2">
<h2 id="sec-1"><span class="section-number-2">1</span> Motivation</h2>
<div class="outline-text-2" id="text-1">
<p>
The package shall make various econometric data sets accessible,
similar to the way that the <a href="https://github.com/johnmyleswhite/RDatasets.jl">RDatasets</a> package provides access to
standard data sets that are available in R.
</p>

<p>
The problem with some econometric data sets, however, is that although
data is freely available at the web, it is not allowed to redistribute
the data set. Hence, some of the data sets are not shipped
automatically with the package, but they need to be downloaded into
the package's data directory first.
</p>

<p>
Once a given data set is downloaded, it can be loaded in Julia with a
syntax similar to <code>RDatasets</code>:
</p>

<div class="org-src-container">

<pre class="src src-julia">using EconDatasets
sectors = dataset("Sectors")
</pre>
</div>

<p>
In order to download a given data set, one needs to use call function
<code>getDataset</code> first. This way, data is downloaded into the data
directory of the package, making it accessible for future use with
function <code>dataset</code>.
</p>
<div class="org-src-container">

<pre class="src src-julia">getDataset("FFF") # Fama French factors
</pre>
</div>

<p>
In addition, there also exist functions that directly load data into
an interactive Julia session, without storing them on disk for future
use. For some of these data sets, however, some minor manual
interaction might be required to label and process the data
adequately. 
</p>
</div>
</div>


<div id="outline-container-sec-2" class="outline-2">
<h2 id="sec-2"><span class="section-number-2">2</span> Table of data sets</h2>
<div class="outline-text-2" id="text-2">
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">


<colgroup>
<col  class="left" />

<col  class="left" />
</colgroup>
<thead>
<tr>
<th scope="col" class="left">Name</th>
<th scope="col" class="left">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="left">Sectors</td>
<td class="left">Sector affiliations for SP500 components</td>
</tr>

<tr>
<td class="left">SP500</td>
<td class="left">Stock price data for SP500 components</td>
</tr>

<tr>
<td class="left">UMD</td>
<td class="left">Fama French momentum portfolio</td>
</tr>

<tr>
<td class="left">FFF</td>
<td class="left">Fama French factors</td>
</tr>

<tr>
<td class="left">SP500Ticker</td>
<td class="left">SP500 ticker symbols from Wikipedia</td>
</tr>

<tr>
<td class="left"><a href="http://juliafinmetrix.github.io/EconDatasets.jl/data_description_indices.md">Indices</a></td>
<td class="left">Major stock price indices</td>
</tr>

<tr>
<td class="left">Treasuries</td>
<td class="left">US Treasury rates, several maturities</td>
</tr>

<tr>
<td class="left">DieboldLi</td>
<td class="left">fixed-maturity yields used in Diebold-Li</td>
</tr>
</tbody>
</table>

<p>
From these data sets, only the following ones are already included in
the repository: 
</p>
<ul class="org-ul">
<li>Sectors
</li>
<li>SP500Ticker
</li>
</ul>
</div>
</div>

<div id="outline-container-sec-3" class="outline-2">
<h2 id="sec-3"><span class="section-number-2">3</span> Data sets to be downloaded first</h2>
<div class="outline-text-2" id="text-3">
<p>
The following data sets do not ship with the package, as they may not
be re-distributed. Hence, they need to be downloaded first. This can
be done with function <code>getDataset</code>. Some of these data sets will call
a script and not a function, so they will create some variables in
your workspace. Also, if running the scripts through the high level
function <code>getDataset</code> causes an error, it still might work if you run
the script with <code>include</code>:
</p>

<div class="org-src-container">

<pre class="src src-julia">include(joinpath(Pkg.dir("EconDatasets"), "src/getDataset/", "getSP500.jl"))
</pre>
</div>

<ul class="org-ul">
<li>Data sets downloaded by functions
<ul class="org-ul">
<li>FFF
</li>
<li>UMD
</li>
<li>Indices
</li>
<li>Treasuries
</li>
<li>DieboldLi
</li>
</ul>
</li>
<li>Data sets downloaded by scripts
<ul class="org-ul">
<li>SP500 (due to parallel computing)
</li>
<li>SP500Ticker (due to Gumbo package usage)
</li>
</ul>
</li>
</ul>
</div>
</div>

<div id="outline-container-sec-4" class="outline-2">
<h2 id="sec-4"><span class="section-number-2">4</span> Table of functions to interactively download data</h2>
<div class="outline-text-2" id="text-4">
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">


<colgroup>
<col  class="left" />

<col  class="left" />
</colgroup>
<thead>
<tr>
<th scope="col" class="left">Name</th>
<th scope="col" class="left">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="left"><code>readFamaFrench</code></td>
<td class="left">&#xa0;</td>
</tr>

<tr>
<td class="left"><code>readFamaFrenchRaw</code></td>
<td class="left">see <a href="http://nbviewer.ipython.org/github/JuliaFinMetriX/EconDatasets.jl/blob/master/ijulia_tutorials/readFamaFrenchRaw.ipynb">ijulia example</a></td>
</tr>

<tr>
<td class="left"><code>readYahooFinance</code></td>
<td class="left">see <a href="http://grollchristian.wordpress.com/2014/09/05/sp500-data-download-julia/">blog post</a></td>
</tr>

<tr>
<td class="left"><code>readYahooAdjClose</code></td>
<td class="left">see <a href="http://grollchristian.wordpress.com/2014/09/05/sp500-data-download-julia/">blog post</a></td>
</tr>

<tr>
<td class="left"><code>getAdjClose</code></td>
<td class="left">&#xa0;</td>
</tr>

<tr>
<td class="left"><code>readUSTreasuries</code></td>
<td class="left">&#xa0;</td>
</tr>
</tbody>
</table>
</div>
</div>


<div id="outline-container-sec-5" class="outline-2">
<h2 id="sec-5"><span class="section-number-2">5</span> Acknowledgement</h2>
<div class="outline-text-2" id="text-5">
<p>
Of course, any package can only be as good as the individual parts
that it builds on. Accordingly, I'd like to thank all people that
were involved in the development of all the functions that were made
ready to use for me to build this package upon. In particular, I want
to thank the developers of
</p>
<ul class="org-ul">
<li>the <b>Julia language</b>, for their continuous and tremendous efforts
during the creation of this free, fast and highly flexible
programming language!
</li>
<li>the <b>DataFrames</b> package, which definitely provides the best
representation for general types of data in data analysis. It's a
role model that every last bit of code of <code>TimeData</code> depends on, and
the interface that every statistics package should use.
</li>
<li>the <b>Datetime</b> package, which is a thoughtful implementation of
dates, time and durations, and the backbone of all time components
in <code>TimeData</code>.
</li>
<li>the <b>TimeSeries</b> package, which follows a different approach to
handling time series data. Having a quite similar goal in mind, the
package was a great inspiration for me, and occasionally I even
could borrow parts of code from it (for example, from an old version
of function <code>readtime</code>).
</li>
</ul>
</div>
</div>
</div>
<div id="postamble" class="status">
<p class="creator"><a href="http://www.gnu.org/software/emacs/">Emacs</a> 24.3.1 (<a href="http://orgmode.org">Org</a> mode 8.2.10)</p>
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
</div>
</body>
</html>
